﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Role_List.ascx.cs" Inherits="AdminPortal_Controls_Account_Role_List" %>
<%@ Register src="../Toolbox.ascx" tagname="Toolbox" tagprefix="uc1" %>
<%--<script>
    //-- button chon nhieu san pham sang
    function btnAddSitemap() {
        var cmdListSitemap = $('[id$=ddlSiteMap] option:selected');
        var cmdListChoice = $('[id$=ddlSiteMapChoice]');
        $(cmdListSitemap).each(function () {
            var pID = $(this).val();
            var pName = $(this).text();
            if (pID != '' || pID != null) {
                if (pID != "0") {
                    var opt = $('[id$=ddlSiteMapChoice] option[value=' + pID + ']').val();
                    if (opt == undefined) {
                        cmdListChoice.append('<option value="' + pID + '">' + pName + '</option>');
                    }
                }
            }
        });

    }

    //button xoa cac san pham
    function btnDelSitemap() {
        var cmdListChoice = $('[id$=ddlSiteMapChoice] option:selected');
        $(cmdListChoice).each(function () {
            var pID = $(this).val();
            $(this).remove();
        });

    }

    // SELECT toan bo sanpham
    function SelectAllSitemap() {
        var cmdListSitemap = $('[id$=ddlSiteMap] option');
        var cmdListChoice = $('[id$=ddlSiteMapChoice]');
        $(cmdListSitemap).each(function () {
            var pID = $(this).val();
            var pName = $(this).text();
            if (pID != "0") {
                var opt = $('[id$=ddlSiteMapChoice] option[value=' + pID + ']').val();
                if (opt == undefined) {
                    cmdListChoice.append('<option value="' + pID + '">' + pName + '</option>');
                }
            }
        });

    }

    //DELETE ALL Sitemap
    function DeleteAllSitemap() {
        var cmdListChoice = $('[id$=ddlSiteMapChoice] option');
        $(cmdListChoice).remove()
    }

    //chon tat ca chkBox
    function getAllCheckBox() {
        $('[id$=ListCheckBox] input[type=checkbox]').attr('checked', true);
    }

    //bo chon checkbox
    function setUnAllCheckBox() {
        $('[id$=ListCheckBox] input[type=checkbox]').attr('checked', false);
    }

    function SiteMapChoiceClick() {
        var cmdListProduct = $('[id$=ddlSiteMapChoice] option:selected');
        var _name = $(cmdListProduct).text().replace('--', '');
        var _sID = $(cmdListProduct).val();
        $('input[id$=txtRoleName]').val(_name);
    }
</script>--%>
<span style="color:Red;font-style:italic;font-size:11px;margin-bottom:5px;display:block;"><asp:Label ID="lblthongbao" runat="server" Text=""></asp:Label></span>
<div id="HNGdatagridInfo">
    <div class="header-datagrid">
        <span class="icon-edit header-text">
                <asp:Label ID="lblTitle" runat="server" Text="Cập nhập quyền"></asp:Label>
        </span>
    </div>
    <div class="navibar-control">
            <uc1:Toolbox ID="Toolbox1" runat="server" ShowSave="true" OnSaveClick="btnSave_Click"
                                                      ShowApply="true" OnApplyClick="btnApply_Click"
                                                      ShowRefesh="true" ShowBack="true" OnBackClick="btnBack_Click"
                                                        />        
        <div class="clearB"></div>
    </div>
    <div class="content-main"> 
        <table cellpadding="0" cellspacing="0" width="100%" class="tableEditInfo">
            <tr>
                <td width="120" class="itemTableLeft">ID</td>
                <td class="itemTableRight">
                    <asp:TextBox ID="txtID" runat="server" Width="50px" Enabled="false"></asp:TextBox>
                    <asp:HiddenField ID="hidID" runat="server" />
                </td>
            </tr>  
            <tr>
                <td class="itemTableLeft"></td>
                <td class="itemTableRight">
                     <table cellpadding="0" cellspacing="0" style="border:none;">
                            <tr>
                                <td align="left" style="border:none;width:250px;">Các chức năng</td>
                                <td style="border:none;"></td>
                                <td align="left" style="border:none;"> Quyền đang có
   <%--                              <ul class="AddProTogether">
                                   <li><a id="OptioncheckAll" href="" onclick="javascript:SelectAllSitemap();return false;">Chọn hết</a>&nbsp;</li>
                                    <li><img src="../images/icon/redo.png" alt="" width="16" height="16" /></li>   
                                    <li>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</li>
                                    <li><a id="OptionUncheck" href="" onclick="javascript:DeleteAllSitemap();return false;">Xoá hết</a>&nbsp;</li>
                                    <li><img src="../images/icon/undo.png" align="left" alt="" width="16" height="16" /></li>

                                    <li><asp:LinkButton ID="lnkGetAllSiteMap" runat="server" Text="Chọn tất" 
                                            onclick="lnkGetAllSiteMap_Click"></asp:LinkButton>&nbsp;</li>
                                    <li><img src="../images/icon/redo.png" alt="" width="16" height="16" /></li>   
                                    <li>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</li>
                                    <li><asp:LinkButton ID="lnkUnGetAllSiteMap" runat="server" Text="Bỏ chọn" 
                                            onclick="lnkUnGetAllSiteMap_Click"></asp:LinkButton>&nbsp;</li>
                                    <li><img src="../images/icon/undo.png" align="left" alt="" width="16" height="16" /></li>
                                </ul>--%>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top" align="left" style="border:none;">
                                    <%--<select id="listSitemap" multiple="multiple" style="width:250px;height:200px;" ondblclick="javascript:getSitemapToListbox();"></select>--%>
                                    <asp:ListBox ID="ddlSiteMap" runat="server" Width="250" Height="200" SelectionMode="Multiple"></asp:ListBox>
                                    <asp:HiddenField ID="hidsID" runat="server" />
                                </td>
                                <td width="60px" valign="middle" align="center" style="border:none;">
                                   <%-- <input type="button" value=">>" id="btnChoice" style="margin-bottom:10px;padding:5px;" onclick="javascript:btnAddSitemap();return false;" /><br />
                                    <input type="button" value="<<" id="btnUnChoice" style="padding:5px;" onclick="javascript:btnDelSitemap();return false;" />--%>
                                    <asp:Button ID="btnIn" runat="server" style="margin-bottom:10px;padding:5px;" 
                                        Text=">>" onclick="btnIn_Click" /><br />
                                    <asp:Button ID="btnOut" runat="server" style="padding:5px;" Text="<<" 
                                        onclick="btnOut_Click"/>
                                </td>
                                <td valign="top" align="left" style="border:none;">
                                    <%--<select id="listSitemapChoice" multiple="multiple" style="width:250px;height:200px;" ondblclick="javascript:dblDelSitemap();"></select>--%>
                                    <asp:ListBox ID="ddlSiteMapChoice" runat="server" Width="250" Height="200" 
                                        SelectionMode="Multiple" AutoPostBack="True" 
                                        onselectedindexchanged="ddlSiteMapChoice_SelectedIndexChanged"></asp:ListBox>
                                </td>
                            </tr>
                        </table>
                </td>
            </tr> 
            <tr>
                <td class="itemTableLeft" width="130">Nhóm thành viên: </td>
                <td align="left" class="itemTableRight">
                    <asp:DropDownList ID="ddlThanhVienGroup" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>  
            <tr>
                <td class="itemTableLeft" width="130" valign="top">Chức năng: </td>
                <td align="left" class="itemTableRight">                                                           
                    <asp:LinkButton ID="lnkCheckAll" runat="server" Text="Chọn tất" onclick="lnkCheckAll_Click"></asp:LinkButton>
                    <%--<a href="" onclick="javascript:getAllCheckBox();return false;">Tất cả</a>--%>
                    &nbsp;&nbsp;|&nbsp;&nbsp;
                    <%--<a href="" onclick="javascript:setUnAllCheckBox();return false;">Bỏ chọn</a>--%>
                    <asp:LinkButton ID="lnkUnCheckAll" runat="server" Text="Bỏ chọn" onclick="lnkUnCheckAll_Click"></asp:LinkButton>
                    <div style="width:450px;padding-top:10px;" id="ListCheckBox">
                    <div style="width:150px;float:left;padding-bottom:8px;"><asp:CheckBox ID="chkAdd" runat="server" Text="Thêm mới"/></div>
                    <div style="width:150px;float:left;padding-bottom:8px;"><asp:CheckBox ID="chkDel" runat="server" Text="Xoá"/></div>
                    <%--<div style="width:150px;float:left;padding-bottom:8px;"><asp:CheckBox ID="chkEdit" runat="server" Text="Sửa" /></div>--%>
                    <div style="width:150px;float:left;padding-bottom:8px;"><asp:CheckBox ID="chkSave" runat="server" Text="Lưu lại" /></div>
                    <div style="width:150px;float:left;padding-bottom:8px;"><asp:CheckBox ID="chkApply" runat="server" Text="Cập nhật" /></div>
                    <%--<div style="width:150px;float:left;padding-bottom:8px;"><asp:CheckBox ID="chkRefesh" runat="server" Text="Refesh" /></div>--%>
                    <div style="width:150px;float:left;padding-bottom:8px;"><asp:CheckBox ID="chkBack" runat="server" Text="Quay lại" /></div>
                    <div style="width:150px;float:left;padding-bottom:8px;"><asp:CheckBox ID="chkSearch" runat="server" Text="Tìm kiếm" /></div>
                    </div>                    
                </td>
            </tr> 
<%--            <tr>
                <td class="itemTableLeft" >Hiển thị </td>
                <td align="left" class="itemTableRight">
                    <asp:CheckBox ID="chkView" runat="server" Text="Ẩn/Hiện" />
                </td>
            </tr>--%>
            <tr>
                <td class="itemTableLeft" valign="top">Trạng thái :</td>
                <td align="left" class="itemTableRight">
                    <asp:CheckBox ID="chkView" runat="server" Text="Ẩn/Hiện" />
                 </td>
            </tr>                                                                         
        </table>              
    </div>
</div>
